class ReceivingTicket < ActiveRecord::Base
  attr_accessible :ConsecCliente, :FechaRecepcion, :Hora, :IdCliente, :IdDestino, :IdRTMercancia, :IdRTProveedor, :IdRTReexpedicion, :IdRTTransportista, :IdTipoEntrada, :Numero,
     :rt_mercancia_attributes, :rt_transportista_attributes, :rt_proveedor_attributes, :reexpedicion_attributes

  belongs_to :rt_proveedor, :class_name => 'RtProveedor', :foreign_key => 'IdRTProveedor'
  accepts_nested_attributes_for :rt_proveedor
  
  belongs_to :rt_transportista, :class_name => 'RtTransportista', :foreign_key => 'IdRTTransportista'
  accepts_nested_attributes_for :rt_transportista
  
  belongs_to :rt_mercancia, :class_name => 'RtMercancia', :foreign_key => 'IdRTMercancia'
  accepts_nested_attributes_for :rt_mercancia
  
  
  belongs_to :reexpedicion, :class_name => 'Reexpedicion', :foreign_key => 'IdRTReexpedicion'
  accepts_nested_attributes_for :reexpedicion
end
